package cn.com.biz;

import java.util.List;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import cn.com.dao.KeShiDao;
import cn.com.entity.KeShi;

public class KeShiBiz {
	private KeShiDao keshiDao;

	public KeShiDao getKeshiDao() {
		return keshiDao;
	}

	public void setKeshiDao(KeShiDao keshiDao) {
		this.keshiDao = keshiDao;
	}
	public List<KeShi> chakankeshi(){
		ApplicationContext ctx=new ClassPathXmlApplicationContext("applicationContext.xml");
		keshiDao=(KeShiDao)ctx.getBean("keshiDao");
		List<KeShi> cklist=keshiDao.chakankeshi();
		return cklist;
	}
	public boolean insertkeshi(int keshiid,String keshiming){
		boolean b=keshiDao.insertkeshi(keshiid, keshiming);
		return b;
	}
	public boolean updatekeshi(int keshiid,String keshiming){
		boolean b=keshiDao.updatekeshi(keshiid, keshiming);
		return b;
	}
	public boolean deletekeshi(int keshiid){
		boolean b=keshiDao.deletekeshi(keshiid);
		return b;
	}
}
